hvmloader: flip "ACPI data" to "ACPI NVS" type for ACPI table region
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 20 Oct 2020 12:46:20 +0000 (14:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 12:46:20 +0000 (14:46 +0200)
commit7b1e587f25c2dda38236e48aae81729798f10663
tree33a5a94b710eae52d0ff2ce46450d14466afe593
parentee47e8e8d9248678d1f638c6b6ec6174dbc9117b
hvmloader: flip "ACPI data" to "ACPI NVS" type for ACPI table region

ACPI specification contains statements describing memory marked with regular
"ACPI data" type as reclaimable by the guest. Although the guest shouldn't
really do it if it wants kexec or similar functionality to work, there
could still be ambiguities in treating these regions as potentially regular
RAM.

One such example is SeaBIOS which currently reports "ACPI data" regions as
RAM to the guest in its e801 call. Which it might have the right to do as any
user of this is expected to be ACPI unaware. But a QEMU bootloader later seems
to ignore that fact and is instead using e801 to find a place for initrd which
causes the tables to be erased. While arguably QEMU bootloader or SeaBIOS need
to be fixed / improved here, that is just one example of the potential problems
from using a reclaimable memory type.

Flip the type to "ACPI NVS" which doesn't have this ambiguity in it and is
described by the spec as non-reclaimable (so cannot ever be treated like RAM).

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: de6d188a519f9e3b7a1acc7784adf4c243865f9a
master date: 2020-10-20 08:54:23 +0200
tools/firmware/hvmloader/e820.c